<!--author:王佳欣-->
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>管理员页面</title>
        <script src="js/jquery.min.js"></script>
        <meta name="description" content="Charcoal is a free Bootstrap 4 UI kit build by @attacomsian at Wired Dots." />
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" href="css/bootstrap.css">
        <style>
            .dropbtn {
                background-color: transparent;
                color: white;
                padding-left: 35px;
                padding-right: 35px;
                font-size: 16px;
                border: none;
                cursor: pointer;
            }
            .dropdown {
                position: relative;
                display: inline-block;text-align: center;
            }
            .dropdown-content {
                display: none;
                position: absolute;
                background-color: #f9f9f9;
                width: 100%;;
                box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
            }
            .dropdown-content a {
                color: black;
                padding: 12px 16px;
                text-decoration: none;
                display: block;
            }
            .dropdown-content a:hover {
                background-color: #f1f1f1
            }
            .dropdown:hover .dropdown-content {
                display: block;
            }
            .dropdown:hover .dropbtn {
                background-color: transparent;
            }
            .col-sm-new {
                border-radius: 15px;
                -ms-flex: 0 0 100%;
                flex: 0 0 100%;
                max-width: 100%; }
            /*导航栏样式*/
            .navbar {
                background-color: #222;
            }
            #daohang {
                list-style-type: none;
                margin: 0;
                padding: 0;
                overflow: hidden;
                background-color: transparent;
            }
            li {
                float: left;
            }
            li a {
                display: block;
                color: white;
                text-align: center;
                padding: 14px 16px;
                text-decoration: none;
            }
        </style>
    </head>
    <body>
        <nav class="navbar navbar-expand-md navbar-dark fixed-top sticky-navigation">
            <a class="navbar-brand font-weight-bold" href="index.html">别叫我OJ</a>
            <div class="collapse navbar-collapse" id="topMenu">
                <ul class="navbar-nav ml-auto" >
                    <div style="margin:5px" id="logout">
                        <a style="color: white" href="index.html"> 切换到普通用户模式</a>
                    </div>
                    <div style="margin:5px" id="javaoj">
                        <div class="dropdown">
                            <button class="dropbtn">设置</button>
                            <div class="dropdown-content">
                                <a href="updateInfo.html">修改个人信息</a>
                                <a href="updatePassword.html">修改密码</a>
                            </div>
                        </div>
                    </div>
                </ul>
            </div>
        </nav>
        <!--hero section-->
        <section class="bg-hero">
            <div class="container">
                <div class="row vh-100">
                    <div class="col-sm-new my-auto text-center">
                        <h1 style="color: white">管理员平台</h1>
                        <p style="color: white" class="lead text-capitalize my-4">
                            基于微服务实现的OJ系统
                        </p>
                        <a href="aboutUs.html" class="btn btn-outline-light btn-radius btn-lg">关于我们</a>
                    </div>
                </div>
            </div>
        </section>
        <!--components-->
        <section class="my-5 pt-5">
            <div class="container">
                <!-- Tables  -->
                <div class="row mb-5" id="tables">
                    <div class="col-sm-12" style="background-color: white">
                        <div class="mt-3 mb-5">
                            <h3>管理员功能</h3>
                            <table class="table table-striped">
                                <thead>
                                    <tr>
                                        <th>编号</th>
                                        <th>功能</th>
                                    </tr>
                                </thead>
                                <tbody id="problemTable">
                                    <tr style="background-color: #f5f5f5">
                                        <td>1</td>
                                        <td><a href="manageQuestion.html">管理题目</a></td>
                                    </tr>
                                    <tr>
                                        <td>2</td>
                                        <td><a href="addUser.html">添加管理员权限</a></td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!--footer-->
        <section class="py-5 bg-dark">
            <div class="container">
                <div class="row">
                    <div class="col-md-6 offset-md-3 col-sm-8 offset-sm-2 col-xs-12 text-center">
                        <p class="pt-2 text-muted">
                            &copy; by <a href="aboutUs.html" target="_blank">别叫我们组</a>
                        </p>
                    </div>
                </div>
            </div>
        </section>
<!--        <script src="js/jquery.min.js"></script>-->
        <!-- <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script> -->
<!--        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js"></script>-->
<!--        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script>-->
<!--        <script src="js/app.js"></script>-->
        <script>
            var userId=localStorage.getItem("userId");
            //获取用户登录信息，获取失败则返回登录页面
            function getUser(){
                if (userId==null){
                    location.assign("login.html");
                }
            }
            function logout(){
                localStorage.clear();
            }
            getUser();
        </script>
    </body>
</html>
